home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / 422mods.zip / DAWG09A.422 < prev    next >
Text File  |  1993-02-09  |  11KB  |  260 lines

  1. 1[2DAWG09B.MOD1]  0Ansi Logon Mod
  2. Dawg #1 @13498
  3. Thu Feb 04 21:03:35 1993
  4. ╔══════════════════════════════════════════════════════════════════════════╗
  5. ║ MOD     :DAWG09A.MOD - ANSI Logon                                        ║
  6. ║ DATE    :01/27/93                                                        ║
  7. ║ USAGE   :WWIV 4.22                                                       ║
  8. ║ VERSION :1.30                                                            ║
  9. ║ Descrip.:Ansi logon mod.                                                 ║
  10. ║ Diff.   :4  (on a scale of 1-10, 1 being easy)                           ║
  11. ║ Author  :6Dawg0   116@134722/116@1134980                                           ║
  12. ║ BBS     :6Thunder2world0                                                    ║
  13. ║ Thanx to:4Fish7Bone0 of 7Star4Base0 4Fish7Bone0 (3478 net/13454 link)             ║
  14. ║            for beta testing this mod and for his countless suggestions   ║
  15. ║            some of which were implemented.                               ║
  16. ║          1Tolkien0 of the 1Fellowship0 (3456 net) for writing up ENHANCE.C.  ║
  17. ║            and for his suggestions for improvement.                      ║
  18. ║          4Sam0 (2177 net) for helping me debug the ansi problems.          ║
  19. ╚══════════════════════════════════════════════════════════════════════════╝
  20.  
  21. This mod is based on Tolkien's snazzy logon procedure.  For those of you
  22. who haven't ever had the pleasure of logging onto the Fellowship (@3456),
  23. he has a dos type logon.  After you get past that, this nice ansi box
  24. pops up and the user enters his/her information to logon.  Well I wrote
  25. an ansi type logon a while back (Dawg07.mod), but never got around to
  26. writing it up and releasing it because of two reasons.  Number one, it was
  27. a pain in the ass to install, and number two, because it was such a pain
  28. to install, I dreaded writing it up.  However, when Tolkien released
  29. ENHANCE.C it sent me back to the source code.  I redid the logon using
  30. some of the nice functions from that file and here is the result.
  31. One of the "side effects" of this mod is that it also will print out the
  32. first six digits of the users phone number instead of XXX-XXX-.  Nothing
  33. major, just a nice cosmetic thing.
  34.  
  35.  
  36. I have updated this to do two things.  Number one is that it handles the
  37. topscreen for you.  It notes what it is set for, toggles it off during a user
  38. logon, and replaces it like it was.  This was Tolkien's idea, and I really
  39. like it much better.  This mod also FORCES the ansi box on all callers, so
  40. if you have many non-ansi users, you may not want to use this.  The mod notes
  41. if the user has ansi, if not, it sets their ansi status on, and then when the
  42. logon is complete, it turns it back off.  Again, Tolkien's suggestion, but I
  43. didn't implement it until Sam brought to my attention the problems with
  44. some high speed modems and WWIV not sensing ansi for them.
  45.  
  46.  
  47. NOTE:  You MUST have ENHANCE.C installed to make use of this mod.  This mod
  48.        relies on several functions included in that file.  So if you want to
  49.        use this mod, you need to get ahold of ENHANCE.C.  If you don't have
  50.        this file, it can be found on most support boards, including Tolkien's
  51.        (The Fellowship, @3456 WWIVNet).  Current filename for it is ENH110.ZIP.
  52.  
  53.  
  54. Well on with the mod. :)
  55.  
  56.  
  57. +  New code
  58. -  Existing code
  59. *  Modified code
  60. @  Deleted code
  61.  
  62.  
  63. Step 1:
  64. -------
  65. BACK UP YOUR SOURCE CODE!!!!!!!!   This mod only alters LILO.C, but you
  66. should always back up your source code.  If something goes wrong or you
  67. don't like the mod, you have something to go back to.
  68.  
  69.  
  70. Step 2:
  71. -------
  72. Load up LILO.C.  The entire mod is in void getuser.  I would like to make
  73. note of something.  Change the following code appropriately.  Make sure you
  74. pay close attention, as you change a few lines and delete a few in addition
  75. to all the adding:
  76.  
  77. Add this to the variable declarations at the top of void getuser, it will
  78. be used to show the first six digits of the users phone number:
  79.  
  80. char stl[13];
  81. int topstatus,hasansi;
  82.  
  83. then a little ways down, make the following alterations:
  84.  
  85.  
  86. - #endif
  87. -       if (ans>0)
  88.  -         printfile("welcome.ans");
  89. -       else if (ans==0)
  90. -         printfile("welcome.msg");
  91. -     } else
  92. -       printfile("welcome.msg");
  93. -   }
  94. -  if (curatr!=7)
  95. -    reset_colors();
  96. +   {                       /*The next 3 lines are courtesy of Ozz/Ruggedo*/
  97. +     thisuser.comp_type=2; /*They force ansi upon everyone, at least*/
  98. +     thisuser.sysstatus |= sysstatus_ansi; /*until they enter their name*/
  99. +     thisuser.sysstatus |= sysstatus_color;
  100. +   }
  101. -   do {
  102. -     nl();
  103. -    if (net_only) {
  104. -      pl("This time is reserved for net-mail ONLY.");
  105. -      pl("Please try calling back again later.");
  106. *    }
  107. @      pl("Enter number or name or 'NEW'");
  108. -    outstr("NN: "); /* DON'T change the NN: prompt. */
  109. +    topstatus=topdata;
  110. +    topdata=0;
  111. +    hasansi=0;
  112. +    if (okansi()) { /* but this seemed easier and cleaner          */
  113. +      clearscreen();
  114. +      makewin(7,0,30,2,52,4);
  115. +      writebetween(31,51,3,6,"Thunderworld"); /*Fill in your own bbs*/
  116. +      makewin(7,4,22,5,60,10);
  117. +      writeat(23,6,1,"Name :");
  118. +      writeat(23,7,1,"Pword:");
  119. +      writeat(23,8,1,"Phone:");
  120. +      writeat(23,9,0,"                                     ");
  121. +      writeat(29,9,5,"Enter Name/Alias or NEW");
  122. +      goxy(29,6);
  123. +      backprint("Handle/Alias",4,20,500);
  124. +      ansic(4);
  125. +    }
  126. -    input(s,30);
  127. -    usernum=finduser(s);
  128. -    if ((net_only) && (usernum!=-2))
  129. -      usernum=0;
  130. -    if (usernum>0) {
  131. -      read_user(usernum,&thisuser);
  132. -      read_qscn(usernum,qsc,0);
  133. -      actsl = syscfg.newusersl;
  134. +      if (!(thisuser.sysstatus & sysstatus_ansi)) /*These lines fix the   */
  135. +        {                                         /*ansi problem, everyone*/
  136. +        hasansi=1;                   /*gets it now :)        */
  137. +        thisuser.sysstatus |= sysstatus_ansi;
  138. +        thisuser.sysstatus |= sysstatus_color;
  139. +        }
  140. -      topscreen();
  141. -      ok=1;
  142. +      if (okansi()){
  143. +        writeat(29,9,5,"Enter Password         ");
  144. +        goxy(29,7);
  145. +        backprint("Password",4,20,500);
  146. +        ansic(4);
  147. +      }
  148. @      outstr("PW: ");
  149. -      echo=0;
  150. -      input(s,8);
  151. -      if (strcmp(s,thisuser.pw)!=0)
  152. -      ok=0;
  153. -      if ((syscfg.sysconfig & sysconfig_free_phone)==0) {
  154. @        outstr("PH: ###-###-");
  155. +        if (okansi()) {
  156. +          stl[0]=0; /*Clear the garbage out of the variable*/
  157. +          strncat(stl,thisuser.phone,8);
  158. +          writeat(29,8,4,stl);
  159. +          writeat(29,9,5,"Enter Phone Number     ");
  160. +          goxy(37,8);
  161. +          backprint("9999",4,20,500);
  162. +          ansic(4);
  163. +        }
  164. -       echo=0;
  165. -       input(s2,4);
  166. -       if (strcmp(s2,&thisuser.phone[8])!=0) {
  167. -         ok=0;
  168. -         if ((strlen(s2)==4) && (s2[3]=='-')) {
  169. -           nl();
  170. -           pl("!! Enter the LAST 4 DIGITS of your phone number ONLY !!");
  171. -           nl();
  172. -         }
  173. -       }
  174. -     }
  175. *     if ((thisuser.sl==255) && (ok)) { /*I made this so all 255's must*/
  176. +       if (okansi()) {                 /*enter the system PW it's up  */
  177. +         writeat(23,9,6,"Sysop:");     /*to your own discretion.      */
  178. +         mpl(31);
  179. +       }
  180. @       outstr("SY: ");
  181. -       echo=0;
  182. -       input(s,20);
  183. +       topdata=topstatus;
  184. -       if (strcmp(s,syscfg.systempw)!=0)
  185. -         ok=0;
  186. -     }
  187. +     if (hasansi==1)       /*turn ansi back off for non-ansi users*/
  188. +     {
  189. +       thisuser.sysstatus ^= sysstatus_ansi;
  190. +       thisuser.sysstatus ^= sysstatus_color;
  191. +       hasansi=0;
  192. +     }
  193. -     echo=1;
  194.  
  195. Step 3:
  196. -------
  197. Further down in Lilo.c make the following one line addition.  It's just
  198. a cosmetic screen clear to keep the screen nice for new users.  I used
  199. Tolkien's clearscreen command from enhance.c for consistency purposes,
  200. but you don't have to do it that way.
  201.  
  202. -      if (usernum==-1) {
  203. +       clearscreen();
  204. -    newuser();
  205. -    ok=1;
  206. -      } else
  207. -    if (usernum==0) {
  208. -      if (net_only)
  209.  
  210. Step 4:
  211. -------
  212. Then recompile.  Finally, I have released a mod that DOESN'T require a full
  213. recompile.  Shouldn't take more than a few seconds to recompile LILO and to
  214. link.  Then test it out.  Also, I tried to comment what the changes were,
  215. but to clear some stuff up, I sysop remotely, I have two local co-sysops
  216. who have 255's, for security they have to enter the system pw when logging
  217. on.  You can choose not to modify that one line and you won't have to do
  218. this, but for most it won't matter as I'm sure most local #1's fast logon
  219. anyway.  Well, that should about cover things.  I'm quite sure the code
  220. could be done more efficiently and/or cleaner, but what can I say.
  221. It works on at least two systems so....
  222.  
  223. If you have any problems with this mod, feel free to contact me.  My net
  224. address is 1@3472, and my link address is 1@13498.  I will do what I can
  225. to help.  Oh and one last thing, if anyone does actually use this mod,
  226. I'd appreciate a short note through the net or link telling me that.
  227.  
  228. Thanks,
  229.  
  230.                           6Dawg0
  231.  
  232. Revision history:
  233. -----------------
  234. 1.30  (01/27/93)  Well, I went back to WWIV (good riddance VBBS) and
  235.           updated this for v4.22.  Feel free to externalize the
  236.           strings.  I did, but I thought it would be easier to leave
  237.           that up to each individual sysop.
  238.  
  239. 1.20  (03/23/92)  After talking with Sam (1@7106), I decided that to solve
  240.           an ansi autodetect problem that high speed modems were
  241.           having with this mod I would force it on everyone, without
  242.           caring if they have ansi.  This was suggested by Tolkien a
  243.           while back, but I couldn't get it to work at the time so
  244.           I had quit messing with it.  Released as Dawg09A.mod.
  245.  
  246. 1.15  (02/13/92)  After talking with Tolkien (actually 2way chatting), I
  247.           added some code to do the following:  turns of topscreen
  248.           during the logon, and then restores it to it's prelogon
  249.           state.
  250.  
  251. 1.10  (02/10/92)  At the urging of Fishbone, I added the status line
  252.           at the bottom of the box to show what is being entered.
  253.           Actually, it was a good suggestion as I already had the
  254.           line sitting there for the sysop PW, and since most users
  255.           didn't see that, they just had a blank line, now it gets
  256.           used.  Fixed a flaw in my logic about the phone number.
  257.           Released as Dawg09.mod.
  258.  
  259. Previous revisions deleted.
  260.